<template>
  <div class="main">
    <div class="head" @click="$router.push('/login')">头部显示区域调用3个接口分别回显代办个数</div>
    <component :is="isShow"></component>
  </div>
</template>

<script>
const temAdmin = () => import("./comm/temAdmin.vue");
const sysAdmin = () => import("./comm/sysAdmin.vue");
export default {
  data() {
    return {
      userName: localStorage.getItem("usersName"),
    };
  },
  components: {
    temAdmin,
    sysAdmin,
  },
  created() {},
  mounted() {},
  methods: {},
  watch: {},
  computed: {
    isShow() {
      return this.userName === "admin" ? "temAdmin" : "sysAdmin";
    },
  },
};
</script>

<style scoped>
* {
  /* 初始化 清除页面元素的内外边距 */
  padding: 0;
  margin: 0;
  /* 盒子模型 */
  box-sizing: border-box;
}
.main {
  background: #ccc;
  height: 100%;
  width: 100%;
}
.head {
  height: 30%;
  width: 100%;
  background: #042859;
  text-align: center;
  color: pink;
  font-size: 25px;
}
</style>